import { createApp } from "vue";
import App from "./App.vue";
import router from "@/routers/index";
import pinia from "@/stores/index";
import directives from "@/directives/index";
import lazyPlugin from "vue3-lazy";
import Vue3Toastify from "vue3-toastify";
import "virtual:svg-icons-register";
import "vue3-toastify/dist/index.css";
import { passiveSupport } from 'passive-events-support/src/utils';
import { publicUrl } from "./utils/util";

passiveSupport({ events: ['mousewheel'] }) //解决浏览器警告

const app = createApp(App);
lazyPlugin.install(app, {
    loading: publicUrl("/images/imageLoad.gif"),
    error: publicUrl("/images/failImg.png")
});
app.use(router).use(pinia).use(Vue3Toastify, {
    autoClose: 2500,
    position: "top-center",
    toastStyle: {
        fontSize: ".08rem",
    },
}).use(directives).mount("#app");
